{include file="pub/header" /}
	<div class="body"> 
		<div class="nav">
			添加权限
		</div>
		<div class="tap">
			<span class="active">添加权限</span>
		</div>
		<div class="from">
			<form action="" class="active" method="post" enctype="multipart/form-data">
				<div class="p">
					<label>
						<span class="span">上级权限</span>
						<select name="parent_id">
							<option value="0">顶级权限</option>
							{foreach name="auth" item="vo" }
								<option value="{$key}">{$vo}</option>
							{/foreach}
						</select>
						<!-- <input type="text" name="search"> -->
					</label>
				</div>
				<div class="p">
					<label>
						<span class="span">权限名称</span>
						<input type="text" name="name">
					</label>
				</div>
				<div id="auth">
					<div class="p">
						<label>
							<span class="span">控制器</span>
							<input type="text" name="cname" placeholder="顶级权限不用填写">
						</label>
					</div>
					<div class="p">
						<label>
							<span class="span">方法名</span>
							<input type="text" name="aname" placeholder="顶级权限不用填写">
						</label>
					</div>
				</div>
				<div class="p">
					<label>
						<input type="submit" value="提交">
					</label>
				</div>
				<script>
				// $("select[name='parent_id']").change(function(event) {
					// var val = parseInt($(this).val());
					// if (val) {
					// 	var html = '<div class="p"> <label> <span class="span">控制器</span> <input type="text" name="cname"  placeholder="顶级权限不用填写"> </label> </div> <div class="p"> <label> <span class="span">方法名</span> <input type="text" name="aname"  placeholder="顶级权限不用填写"> </label> </div>';
					// 	$("#auth").html(html);
					// }else{
					// 	$("#auth").html('');
					// }
					// console.log(val);
				// });	
				</script>
				
			</form>
		</div>
	</div>
{include file="pub/footer" /}
